package com.antis.olsl.main.bean;

import android.text.SpannableString;
import android.text.TextUtils;

import java.io.Serializable;

/**
 * @ProjectName: ATS_OLSL
 * @Package: com.antis.olsl.bean
 * @ClassName: HomePageMenuInfo
 * @Description: 首页菜单信息
 * @Author: 羊琪
 * @CreateDate: 2020/3/21 17:16
 * @UpdateDate: 2020/3/21 17:16
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class HomePageMenuInfo implements Serializable {
    private String menuId;
    private String menuName;
    private int imageId;
    private SpannableString result;
    private Class activity;
    private String path;

    public HomePageMenuInfo(String menuId, String menuName, int imageId, Class activity) {
        this.menuId = menuId;
        this.menuName = menuName;
        this.imageId = imageId;
        this.activity = activity;
    }

    public HomePageMenuInfo(String menuId, String menuName, int imageId, String path) {
        this.menuId = menuId;
        this.menuName = menuName;
        this.imageId = imageId;
        this.path = path;
    }

    public Class getActivity() {
        return activity;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public void setActivity(Class activity) {
        this.activity = activity;
    }

    public SpannableString getResult() {
        return !TextUtils.isEmpty(result) ? result : new SpannableString(menuName);
    }

    public void setResult(SpannableString result) {
        this.result = result;
    }

    public HomePageMenuInfo() {
    }

    public HomePageMenuInfo(String menuId, String menuName, int imageId) {
        this.menuId = menuId;
        this.menuName = menuName;
        this.imageId = imageId;
    }

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public int getImageId() {
        return imageId;
    }

    public void setImageId(int imageId) {
        this.imageId = imageId;
    }
}
